package com.yuyu.shop.api.apimodel.order.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author
 * @version 1.0
 * @description: TODO
 * @date 2022/8/3 14:55
 */
@Data
@Accessors(chain = true)
public class OrderSaveOrUpdateDTO {

    @NotNull
    private Long shopId;

    @NotNull
    private Long goodId;

    @NotNull
    private String orderId; //订单id

    @NotNull
    private String shopName; //商店名

    @NotNull
    private String shopAddress; //商家地址

    @NotNull
    @Size(max = 11,message = "电话号码不能超过11位")
    private String shopPhone; //商家电话

    @NotNull
    private String goodsName; //商品名

    @NotNull
    private BigDecimal originPrice; //商品原价

    private BigDecimal realPrice; //商品实价

    private Long goodsNum; //购买数量

    private String attribute; //具体参数 如256g内存 8g运行内存 双卡双待等

    private String specification; //具体什么规格 如 iPhone13 远峰蓝

    private String discountName; //优惠名称

    private BigDecimal reduceAccount; //优惠了多少

    private String discountDescribe; //优惠描述信息

    private String accountName; //用户名

    private String realName; //真实名字

    private String phone; //电话号码

    private Integer status; //订单状态

    private Integer orderType; //订单类型

    private String deliverAddress; //收获地址

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime; //创建时间

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime; //更新时间
}
